<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: YanHilin
  Date: 2020/5/14
  Time: 18:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理普通用户</title>
    <base href="http://localhost:8080/onlineflower/">
    <%@include file="/page/comment/head.jsp"%>

    <style type="text/css">
       table{
           margin: auto auto;
            width: 80% !important;
            text-align: center !important;
            vertical-align: middle !important;
        }
       th,tr,td{
           text-align: center !important;
           vertical-align: middle !important;
       }
        #pageN{
            margin-top: 10px;
            display:flex;
            align-items:center;
            justify-content:center;
        }

    </style>
</head>
<body>
<%@include file="/page/admin/head_nav.jsp"%>
<div>
    <table  class="table table-bordered">
        <thead>
        <tr>
            <th>序号</th>
            <th>用户编号</th>
            <th>用户头像</th>
            <th>用户昵称</th>
            <th>真实名字</th>
            <th>联系电话</th>
            <th>邮寄地址</th>
            <th>操作</th>
        </tr>
        </thead>
        <c:forEach items="${requestScope.page.item}" var="list" varStatus="s">
        <tbody>
            <tr>
                <th>${s.count}</th>
                <td>${list.userid}</td>
                <td><img src="static/picUser/${list.head_sculpture}" width="100px" height="80px"> </td>
                <td>${list.pet_name}</td>
                <td>${list.relname}</td>
                <td>${list.telephone}</td>
                <td>${list.address}</td>
                <td><a class="deleteUser" href="adminServlet?action=deleteUser&userid=${list.userid}">删除</a></td>
            </tr>
        </tbody>
        </c:forEach>
    </table>
</div>
<%@include file="/page/comment/page_nav.jsp"%>
</body>
<script>
    $(function () {

        $("a.deleteUser").click(function () {

            var userid=$(this).parent().parent().find("td:first").text();

            //console.log(userid);
            if(confirm("确定删除"+userid+"吗？")){


            }else{
                //alert(enterpriseid);
                return false;

            }
        });
    });
</script>
</html>
